Fix adaptive policy-block console correlation#2117
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Root cause
Browser network capture redacts URL query values immediately, while console
location.urlremains raw until artifact serialization. Adaptive oracle aggregation compared those two representations exactly, so a query-bearing blocked request could be correctly classified as evidence-only network data while its correlated console error remained unmatched and became a finding.Correlation semantics
Correlation still requires both the generic resource URL and the browser failure token to match. The URL comparison now normalizes both sides through the existing browser network URL-redaction contract. This suppresses only console messages attributable to an evidence-only policy block; independent same-URL console errors without the matching failure token remain findings.
Tests
npx tsx --test tests/browser-adaptive-exploration.test.ts: new regression passes; 24/25 overall, with the unrelated timing-sensitive cancellation test failing because no error transition was emitted before cancellationnpm run build: passesnpm run check: relevant build and browser routing/security gates pass, then the existing command-registry smoke fails withwordpress.collect-workload-result outputShape should mention outputSchema idgit diff --check: passesResidual risks
The supplied evidence bundle reports
missing_runtime_snapshotand partial replay status, so the original WordPress runtime could not be replayed deterministically. The regression instead reproduces the captured redacted-network/raw-console mismatch in real Chromium across desktop and mobile/touch contexts.Fixes #2114